package com.jfinal.club._admin.loginLog;

import com.jfinal.aop.Inject;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.club.common.controller.BaseController;
import com.jfinal.club.common.model.LoginLog;
import com.jfinal.kit.Ret;

/**
 * 日志管理控制器
 */
public class LoginLogAdminController extends BaseController {

	@Inject
	LoginLogAdminService srv;

	public void index() {
		Page<LoginLog> loginLogPage = srv.paginate(getParaToInt("p", 1));
		//System.out.println(loginLogPage.getList());
		setAttr("loginLogPage", loginLogPage);
		render("index.html");
	}

	/**
	 * 删除 loginLog
	 */
	public void delete() {
		Ret ret = srv.delete(getParaToInt("id"));
		renderJson(ret);
	}
}


